package br.com.fc.service.client.returntype;

import br.com.fc.service.client.ServiceException;

public class OKReturnType implements ReturnType {

	
	@SuppressWarnings("unchecked")
	public <T> T tratarReturn(Object object, T t) throws Exception {
		try {
			return (T) object;
		} catch (ClassCastException e) {
			throw new ServiceException("Falha objeto espera não e comrpativel.", e);
		}
	}

}
